<template>
	<image class="image-message" :src="message?.payload?.imageInfoArray[0]?.url" mode='widthFix'
		@click="previewImage(message.payload.imageInfoArray[0].url)" />
</template>

<script setup>
	const props = defineProps({
		message: {
			type: Object,
			default: {}
		}
	})

	const previewImage = (src) => {
		uni.previewImage({
			current: src,
			urls: [src]
		})
	}
</script>

<style scoped lang="scss">
	.image-message {
		width: 240rpx;
		height: 240rpx;
		border-radius: 6rpx;
	}
</style>